//
//  YWVideoBrowserAnimator.h
//  videoTest3
//
//  Created by jun peng on 2022/6/10.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN
@class YWVideoBrowserAnimator;
@protocol YWVideoBrowserAnimatorPresentedDelegate <NSObject>

@optional

//这只是NSObject、开始位置结束为止imageView都不知的、要外界返回给我

//传个indexPath给你、你直接返回开始位置给我
-(CGRect)startRect:(NSIndexPath *)contentBeginIndexPath;
//传个indexPath给你、你直接返回结束位置给我
-(CGRect)endRect:(NSIndexPath *)contentBeginIndexPath;

//这里就不能像下面的dismissViewDelegate一样用播放器view了、因为你试一下发现播放顺序会有问题
//你直接返回个imageView给我(SDK没有帧属性就用截图)
-(UIImageView*)imageView:(NSIndexPath *)contentBeginIndexPath;

@end

@protocol YWVideoBrowserAnimatorDismissDelegate <NSObject>

@optional
//拿到你正在看的图片
-(UIImageView*)imageViewForDimissView;


//因为SDK的视频截图会有闪烁效果不好、所以这里用获取播放器view一边播放一边缩小动画效果
-(UIView*)vedioViewForDimissView;

//返回去一开始的位置用上面代理的startRect

@end


@interface YWVideoBrowserAnimator : NSObject

@property(nonatomic,strong)NSIndexPath *contentBeginIndexPath;

@property (weak, nonatomic) id <YWVideoBrowserAnimatorPresentedDelegate>presentedDelegate;
@property (weak, nonatomic) id <YWVideoBrowserAnimatorDismissDelegate>dismissDelegate;


@end

NS_ASSUME_NONNULL_END
